import { HTTP } from '../../util/http'

class Topic extends HTTP {
  list() {
    const url = 'Topic/selectTopicList'
    return new Promise((resolve, reject) => {
      this.request({
        url: url,
        newURL: true,
        success: resolve
      })
    })
  }

  myJoinList() {
    const url = 'Topic/selectMyTopicList'
    return new Promise((resolve, reject) => {
      this.request({
        url: url,
        newURL: true,
        success: resolve
      })
    })
  }
// 删除话题的按钮
  deleteById(data) {
    const url = 'Topic/deleteById'
    return new Promise((resolve, reject) => {
      this.request({
        url: url,
        method: 'POST',
        newURL: true,
        urlData:data,
        success: resolve
      })
    })
  }
}


export default new Topic()
